A filter implements a frequency-selective gain. By specifying which frequency components are transmitted and which are attenuated, a measurement chain can separate signal from noise, prevent aliasing during sampling, suppress slow baseline drift, and reject narrow-band interference. Four worked examples are presented below: low-pass smoothing, anti-alias filtering prior to an analog-to-digital converter, high-pass removal of baseline wander in an electrocardiogram, and a notch filter at the mains frequency.
Most physiological signals carry their diagnostic information within a relatively narrow low-frequency band, whereas sensor noise, thermal noise, and electromagnetic pickup distribute their energy across a much wider range. A low-pass filter applies a frequency-dependent gain that is near unity within the passband and near zero within the stopband, so signal components are preserved while out-of-band noise is suppressed.
The red trace shows the recorded input, comprising a slow biosignal, additive white noise, and a $50\,\mathrm{Hz}$ component representing mains pickup. The green trace shows the same input after a first-order low-pass filter with cutoff $f_c$. The faint blue trace is the underlying noise-free signal, included for reference; the filtered output approaches this reference when $f_c$ lies below the noise band yet above the signal band.
The lower panel displays the filter magnitude response on a linear frequency axis. As $f_c$ is varied, the roll-off region translates accordingly: components above the corner are progressively attenuated, while components below it are transmitted with approximately unity gain.
A sampler operating at rate $f_s$ can uniquely represent frequencies only up to the Nyquist limit $f_s/2$. Any input component above this limit is folded back into the baseband at a lower apparent frequency, where it becomes indistinguishable from a genuine low-frequency component. The only way to prevent this is to remove the high-frequency content with a low-pass filter applied before the sampler. Such a filter is termed the anti-alias filter.
The faint blue curve represents the continuous-time input sinusoid. The yellow markers indicate the sample values acquired at rate $f_s$. The bold trace passing through these markers shows the ideal sinc reconstruction, that is, the continuous waveform that would be produced by an ideal digital-to-analog converter operating on those samples. With the anti-alias filter disabled, an input above $f_s/2$ yields samples consistent with a lower-frequency sinusoid; the resulting reconstruction is plotted in purple and corresponds to the aliased component. With the filter enabled, the input is attenuated before sampling, the samples approach zero, and the reconstruction is correspondingly flat.
The lower panel illustrates the spectrum. The green region indicates the passband below $f_s/2$, and the red region indicates the stopband above. A blue stem marks the position of the input frequency, and a purple stem marks the location at which the alias appears within the baseband. As the input frequency exceeds $f_s/2$, the stem in the stopband produces a corresponding fold-back component within the passband.
An electrocardiogram is recorded on a baseline that is not stationary. Respiration, electrode polarisation, and patient movement each contribute slow voltage drifts whose amplitude can substantially exceed that of the QRS complex. Although the drift contains no diagnostic information, it interferes with threshold-based beat detection and may drive downstream amplifiers into saturation. A high-pass filter is therefore applied to transmit the QRS frequencies, which carry the majority of the diagnostic content, while rejecting the very low frequencies associated with the drift.
The dashed grey curve represents the slow drift component, with energy concentrated below $0.5\,\mathrm{Hz}$. The red trace shows the recorded ECG, comprising the underlying beats summed with this drift. The faint blue trace is the noise-free reference, included for comparison. The green trace is the high-pass output: as $f_c$ is increased through the drift band, the baseline progressively flattens. When $f_c$ is increased beyond the drift band, however, low-frequency components of the QRS complex are also attenuated, producing distortion of the waveform morphology.
The lower panel shows the high-pass magnitude response. The curve is the geometric complement of the low-pass response presented in section 01. Both responses arise from the same first-order pole; the numerator of the transfer function determines the filter type rather than the location of the corner frequency.
Capacitive coupling between mains wiring and the patient leads introduces a sinusoidal interference at $50\,\mathrm{Hz}$, or $60\,\mathrm{Hz}$ in some regions, into every biopotential recording. Because this interference is narrow-band and centred on a known frequency, the appropriate filter is one that attenuates only that frequency while transmitting all others. A filter exhibiting this response is termed a notch filter.
The numerator places a pair of imaginary zeros on the $j\omega$ axis at $\pm j\omega_0$, so the gain at $f_0$ is identically zero. The denominator places poles a short distance to the left of these zeros, and the quality factor $Q$ governs that distance. A larger value of $Q$ produces a narrower notch, attenuating a small band around $f_0$ while leaving adjacent frequencies essentially unaffected.
The red trace shows the contaminated ECG, comprising the clean signal summed with a $50\,\mathrm{Hz}$ sinusoid of sufficient amplitude to obscure the QRS detail. The faint blue trace is the noise-free reference. The green trace is the notch output. When $f_0$ is aligned with $50\,\mathrm{Hz}$ and $Q$ is sufficiently large, the interference is suppressed and the underlying waveform morphology is recovered. The lower panel shows the notch magnitude response: a sharp attenuation at $f_0$ and approximately unity gain elsewhere.